package car.aistar.dao;

import car.aistar.dto.LaoxuPersonDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
*@Author laoxu
*@Description //TODO 个人中心数据多表查询sql
*@Date 15:24 2020/10/8
*@Param
*@return
**/

public interface LaoxuPerson {

    @Select("SELECT r.c_id as id,d.c_photo,br_name,st_name,c_mileage,c_drive,c_Registration,c_paifang,c_status,c_oprice FROM user_records r JOIN car_detail d ON d.id = r.c_id JOIN  car_brands br ON d.br_id = br.id JOIN car_style st ON d.st_id = st.id WHERE r.u_id = #{value} ORDER BY r.id DESC")
    List<LaoxuPersonDto> queryByHistory(Long uid);
}
